﻿<dx:DXWindow x:Class="SQLQuery.UI.Comparsion.DataComparsionConnection"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
        Title="连接" Height="300" Width="497" 
        xmlns:loc="clr-namespace:SQLQuery.Common"
        xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" 
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" 
        xmlns:t="clr-namespace:DBAccessLibrary.Model;assembly=DBAccessLibrary"
        WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow" KeyDown="DXWindow_KeyDown" MaxHeight="300" MaxWidth="497">

    <dxlc:LayoutControl Orientation="Vertical"   Name="layoutControl1">
        <dxlc:LayoutGroup Orientation="Horizontal">
            <dxlc:LayoutGroup Orientation="Vertical" Header="目标数据" Name="layoutGroup1" View="GroupBox" Height="185" Width="216">
                <dxlc:LayoutItem Label="数据源：">
                    <dxe:ComboBoxEdit 
                        loc:EnumSelectorProperty.EnumType="{x:Type t:DBType}"
                        loc:EnumSelectorProperty.BindingPath="DataSource.ConnectType"
                        Text="{Binding DataSource.ConnectType}" IsTextEditable="False">
                    </dxe:ComboBoxEdit>
                </dxlc:LayoutItem>
                <dxlc:LayoutItem Label="服务器：">
                    <dxe:TextEdit Text="{Binding Path=DataSource.Server}"/>
                </dxlc:LayoutItem>
                <dxlc:LayoutItem Label="数据库：">
                    <dxe:ComboBoxEdit Name="cbSourceDB" Text="{Binding Path=DataSource.DataBase}" AutoComplete="True" SelectedIndexChanged="cbSource_SelectedIndexChanged" />
                    <!--<dxe:TextEdit Text="{Binding Path=DataSource.DataBase}"/>-->
                </dxlc:LayoutItem>
                <dxlc:LayoutItem Label="用户名：">
                    <dxe:TextEdit  Text="{Binding Path=DataSource.UserID}"/>
                </dxlc:LayoutItem>
                <dxlc:LayoutItem Label="密  码：">
                    <dxe:PasswordBoxEdit Password="{Binding Path=DataSource.PassWord,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
                </dxlc:LayoutItem>
            </dxlc:LayoutGroup>
            <dxlc:LayoutItem Name="layoutItem2" Height="185" Width="16">
                <dxe:ButtonEdit ShowText="False" AllowDefaultButton="False" Height="20">
                    <dxe:ButtonInfo GlyphKind="Custom" Content=">" ButtonKind="Simple" Click="Button_Click"/>
                </dxe:ButtonEdit>
            </dxlc:LayoutItem>
            <dxlc:LayoutGroup Header="源数据" Orientation="Vertical" Name="layoutGroup2" View="GroupBox" Height="185" Width="219">
                <dxlc:LayoutItem Label="数据源：">
                    <dxe:ComboBoxEdit   
                                    loc:EnumSelectorProperty.EnumType="{x:Type t:DBType}"
                                    loc:EnumSelectorProperty.BindingPath="TargetSource.ConnectType"
                                    Text="{Binding TargetSource.ConnectType}" IsTextEditable="False">

                    </dxe:ComboBoxEdit>
                </dxlc:LayoutItem>
                <dxlc:LayoutItem Label="服务器：">
                    <dxe:TextEdit Text="{Binding Path=TargetSource.Server}"/>
                </dxlc:LayoutItem>
                <dxlc:LayoutItem Label="数据库：">
                    <dxe:ComboBoxEdit Name="cbTargetDB" Text="{Binding Path=TargetSource.DataBase}" AutoComplete="True" SelectedIndexChanged="cbTargetDB_SelectedIndexChanged"/>
                    <!--<dxe:TextEdit Text="{Binding Path=TargetSource.DataBase}"/>-->
                </dxlc:LayoutItem>
                <dxlc:LayoutItem Label="用户名：">
                    <dxe:TextEdit  Text="{Binding Path=TargetSource.UserID}"/>
                </dxlc:LayoutItem>
                <dxlc:LayoutItem Label="密  码：">
                    <dxe:PasswordBoxEdit Password="{Binding Path=TargetSource.PassWord,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
                </dxlc:LayoutItem>
            </dxlc:LayoutGroup>
        </dxlc:LayoutGroup>
        <dxlc:LayoutGroup Name="layoutGroup3" Orientation="Horizontal" View="GroupBox" Height="48" >
            <dxlc:LayoutItem Label="" Name="layoutItem1" Height="23">
            </dxlc:LayoutItem>
            <dxe:ButtonEdit Name="btnOK" ShowText="False" AllowDefaultButton="False" Width="75">
                <dxe:ButtonInfo GlyphKind="Custom" Content="确定" ButtonKind="Simple" Click="btnOK_Click"/>
            </dxe:ButtonEdit>
            <dxe:ButtonEdit Name="btnCanel" ShowText="False" AllowDefaultButton="False" Width="75">
                <dxe:ButtonInfo GlyphKind="Custom" Content="取消" ButtonKind="Simple" Click="btnCanel_Click"/>
            </dxe:ButtonEdit>
            <!--<Button Content="确定" Height="23" Name="btnOK" VerticalAlignment="Top" Width="75" Click="btnOK_Click" IsDefault="True" />
            <Button Content="取消" Height="23" Name="btnCanel" VerticalAlignment="Top" Width="75"  Click="btnCanel_Click" IsCancel="True" />-->
        </dxlc:LayoutGroup>
    </dxlc:LayoutControl>

</dx:DXWindow>

